﻿using System;
using System.Collections.Generic;

namespace JTLeigh.Commerce.Spencer.Features.ProductFeedback.Common.Entities
{

	/// <summary>
	/// Represents a product rating for a single product by a single customer.
	/// </summary>
	public class ProductRating
	{

		#region Constructors

		/// <summary>
		/// Initializes a new instance of the <see cref="ProductRating"/> class.
		/// </summary>
		public ProductRating()
		{
			AttributeValues = new Dictionary<Guid, ProductRatingAttributeValue>();
		}

		#endregion // Constructors

		#region Properties

		/// <summary>
		/// Gets or sets the product feedback identifier of the product feedback that the 
		/// rating is a part of.
		/// </summary>
		/// <value>A product feedback identifier <see cref="Guid"/>.</value>
		public Guid FeedbackId { get; set; }

		/// <summary>
		/// Gets or sets the product rating value.
		/// </summary>
		public byte Value { get; set; }

        /// <summary>
        /// Gets the attribute values of the rating.
        /// </summary>
        /// <value>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="ProductRatingAttributeValue"/>
        /// keyed by attribute identifier <see cref="Guid"/>.</value>
        public Dictionary<Guid, ProductRatingAttributeValue> AttributeValues { get; private set; }

		#endregion // Properties

	}

}
